<template>
  <div class="app-page">
    <!-- 头 -->
    <div class="app-header">
      <div class="app-title">
        <i :class="$route.meta.icon"></i> {{ $route.meta.title }}
      </div>
    </div>
    <div class="app-page-padding">
      <div class="app-section">
        <div class="rs-background-multi">
        </div>
      </div>
      <div class="app-section">
        <!-- bidirectional data binding（双向数据绑定） -->
        <codemirror v-model="code" :options="cmOptions"></codemirror>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'StyleButton',
  data () {
    return {
      code: `
// 多背景
.rs-background-multi {
  height: 300px;
  background: url(~@/assets/bg.jpg) no-repeat scroll 10px 20px,
    url(~@/assets/bg02.jpg) no-repeat scroll 50px 60px,
    url(~@/assets/bg03.jpg) no-repeat scroll 90px 100px;
  background-origin: content-box;
  background-clip: padding-box;
  background-size: 100px 120px;
}
      `,
      cmOptions: {
        // codemirror options
        tabSize: 4,
        mode: 'sass',
        theme: 'darcula',
        lineNumbers: true,
        line: true
        // more codemirror options, 更多 codemirror 的高级配置...
      }
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
// 多背景
.rs-background-multi {
  height: 300px;
  background: url(~@/assets/bg.jpg) no-repeat scroll 10px 20px,
    url(~@/assets/bg02.jpg) no-repeat scroll 50px 60px,
    url(~@/assets/bg03.jpg) no-repeat scroll 90px 100px;
  background-origin: content-box;
  background-clip: padding-box;
  background-size: 100px 120px;
}
</style>
